<template>
  <el-dialog
    :close-on-click-modal="false"
    @close="onClose"
    :title="title"
    :visible.sync="visible"
    :fullscreen="fullscreen"
  >
    <slot></slot>
    <div slot="footer" class="dialog-footer">
      <el-button @click="onClose">返 回</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  props: {
    show: {
      type: Boolean,
      default: false
    },
    title: {
      type: String,
      default: ""
    },
    fullscreen: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      visible: false
    };
  },
  watch: {
    show() {
      this.visible = this.show;
    }
  },
  methods: {
    onClose() {
      this.$emit("onClose");
    }
  }
};
</script>

<style>
</style>